package net.htjs.car.service.impl;

import net.htjs.car.entity.Car;
import net.htjs.car.service.CarService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

@Service
public class CarServiceImpl implements CarService {

    public List getCars() {
        Car carOne = new Car(1L, "奔驰", 18000.00F);
        Car carTwo = new Car(2L, "宝马", 28000.00F);
        Car carThree = new Car(3L, "奥迪", 38000.00F);

        List<Car> cars = new ArrayList();
        cars.add(carOne);
        cars.add(carTwo);
        cars.add(carThree);
        return cars;
    }
}
